<?php


namespace App\Enums;

use App\Models\Library\AgreedMaterials;
use App\Models\Library\ApprovedColorant;
use App\Models\Library\ApprovedPreservative;
use App\Models\Library\ApprovedSunScreen;
use App\Models\Library\ApprovedTint;
use App\Models\Library\DisableBioticComponent;
use App\Models\Library\DisableComponent;
use App\Models\Library\LimitedComponent;
use App\Models\Library\RegisteredMaterials;
use App\Models\Library\UsedMaterials;

class Field
{
    const newMaterialEnum = [
        [
            'key' => 'agreed_materials',
            'label' => '已批准的新原料（2004-2020）',
            'class' => AgreedMaterials::class
        ],
        [
            'key' => 'registered_materials',
            'label' => '已注册备案的新原料（2021-至今）',
            'class' => RegisteredMaterials::class
        ]
    ];

    const MaterialEnum = [
        [
            'key' => 'used_materials',
            'label' => '中国已使用化妆品原料目录',
            'class' => UsedMaterials::class
        ],
        [
            'key' => 'disable_components',
            'label' => '中国化妆品禁用组分名录',
            'class' => DisableComponent::class
        ],
        [
            'key' => 'disable_biotic_components',
            'label' => '中国化妆品禁用植（动）物原料目录',
            'class' => DisableBioticComponent::class
        ],
        [
            'key' => 'limited_components',
            'label' => '中国化妆品安全技术规范限用组分目录',
            'class' => LimitedComponent::class
        ],
        [
            'key' => 'approved_colorants',
            'label' => '中国化妆品安全技术规范准用着色剂清单',
            'class' => ApprovedColorant::class
        ],
        [
            'key' => 'approved_preservatives',
            'label' => '中国化妆品安全技术规范准用防腐剂清单',
            'class' => ApprovedPreservative::class
        ],
        [
            'key' => 'approved_sun_screens',
            'label' => '中国化妆品安全技术规范准用防晒剂清单',
            'class' => ApprovedSunScreen::class
        ],
        [
            'key' => 'approved_tints',
            'label' => '中国化妆品安全技术规范准用染发剂清单',
            'class' => ApprovedTint::class
        ],
    ];

    const ruleEnum = [
        'used_materials' => '中国已使用化妆品原料目录（2021）',
        'disable_components' => '中国化妆品禁用组分名录（2021）',
        'disable_biotic_components' => '中国化妆品禁用植（动）物原料目录（2021）',
        'limited_components' => '中国化妆品安全技术规范限用组分目录（2015）',
        'approved_colorants' => '中国化妆品安全技术规范准用着色剂清单（2015）',
        'approved_preservatives' => '中国化妆品安全技术规范准用防腐剂清单（2015）',
        'approved_sun_screens' => '中国化妆品安全技术规范准用防晒剂清单（2015）',
        'approved_tints' => '中国化妆品安全技术规范准用染发剂清单（2015）',
        'existing_chemicals' => '中国现有化学物质名录（2021）',
        'endangered_species' => '濒危野生动植物种国际贸易公约（CITES) (2021）',
    ];

    const usedMaterialFromZhgMappings = [
        '序号' => 'zhg_sn',
        'CAS号' => 'cas',
        'CN' => 'name_zh',
        'EN' => 'name_en',
        '详情' => 'zhg_detail_path'
    ];

    const crawlerModelMappings = [
        "中国已使用化妆品原料目录"=>UsedMaterials::class,
        "中国化妆品禁用组分名录"=>DisableComponent::class,
        "中国化妆品禁用植（动）物原料目录"=>DisableBioticComponent::class,
        "中国化妆品安全技术规范限用组分目录"=>LimitedComponent::class,
        "中国化妆品安全技术规范准用着色剂清单"=>ApprovedColorant::class,
        "中国化妆品安全技术规范准用防腐剂清单"=>ApprovedPreservative::class,
        "中国化妆品安全技术规范准用防晒剂清单"=>ApprovedSunScreen::class,
        "中国化妆品安全技术规范准用染发剂清单"=>ApprovedTint::class,
    ];

    const usedMaterialDetailsFromZhgMappings = [
        '索引号' => 'zhg_sn',
        '淋洗类产品最高历史使用量(%)' => 'washing',
        '驻留类产品最高历史使用量(%)' => 'lingering',
        '备注' => 'memo',
    ];

    const usedMaterialDisablesFromZhgMappings = [
        '中国化妆品禁用组分名录' => 'exist_disable_components',
        '化妆品禁用植(动)物原料目录' => 'exist_disable_biotic_components',
    ];

    const usedMaterialDetailsTypes = [
        '限用原料目录' => 'limit',
        '准用防腐剂清单' => 'preservative',
        '准用防晒剂清单' => 'sun_screen',
        '准用着色剂清单' => 'colorant',
        '准用染发剂清单' => 'tint',
    ];

    const usedMaterialDetailsNames = [
        '清单项目' => 'title',
        '使用范围和限制条件' => 'range_and_limit',
        '化妆品使用时的最大允许浓度' => 'maximum_concentration',
        '其它限制和要求' => 'other_limit',
        '标签上必须标印的使用条件和注意事项' => 'announcements',
        '备注' => 'note',
    ];

    const tmpCooliesArr = [
//            [
//                'name' => 'passport-user-token',
//                'value' => 'Kh8C-refwZTAVTZFdzTrOSg7sfW-dW1GUveaAqoWSxde4wtbJc6qMuU2KWNsVFdOg6Wcu5_PrlFQpTZFe8hc_YJA0L4vTkw0b2jbSqSjmY9-OsjgGP1fiqkaHOBiXFEa_UH37FQyJEo3cn4bzNk_vy81Q-5eDBya_C13jnOtiO4X1cXN3MKeVluOwa3AK9nwQBpg_p70jZTMZ5iwxxXblw%253D%253D',
//                'domain' => 'passport.cirs-group.com'
//            ],
        [
            'name' => 'zhg-user-token',
            'value' => 'cye8IXN-Vrqn9Xn6W2p36TZXxrnwxUKOmA4JLQ70Mg-GTrx58dpih_NlZxTdvVYRYXfGQJrgmsyzaJTZACXGCKXEU1adNyW7FUvLcJHu_l5bQjSpWB0F837L8dsyLJ_I9mOxRgCt7aGmpcUb8fef9tqYYA9Omzd07Fu6BF8YTMVTYO6NvGMD6sUgbPNYmB4jfU-8fmdXMUVs37KsRz9SduFr2_T3wPg9ebFz3I30et8%253D',
            'domain' => 'zhg.cirs-group.com'
        ],
        [
            'name' => 'login_back',
            'value' => '/product-and-service%2Fchina-cosmetic-ingredient/',
            'domain' => 'zhg.cirs-group.com'
        ],
    ];
}
